package com.anpy.security.repository;

import com.anpy.security.entity.Permission;
import com.anpy.security.entity.Platform;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface PermissionRepository extends JpaRepository<Permission, Long> {
    Optional<Permission> findByNameAndPlatform(String name, Platform platform);
    List<Permission> findByPlatform(Platform platform);
    boolean existsByNameAndPlatform(String name, Platform platform);
}
